package com.fram.service.api.v1;

import com.fram.bean.api.news.request.CommentSearchRequest;
import com.fram.bean.api.news.request.NewsSearchRequest;
import com.fram.bean.api.news.response.CommentSearchResponse;
import com.fram.bean.api.news.response.NewsDetailResponse;
import com.fram.bean.api.news.response.NewsSearchResponse;
import com.fram.bean.sys.PageBean;
import com.fram.common.exception.ProAffairException;
import com.fram.common.exception.ProException;
import com.fram.entity.NewsComment;
import com.fram.entity.ResOperate;
import com.github.pagehelper.PageInfo;

/** 新闻展示 **/
public interface NewsService {

	/** 查询新闻列表 **/
	public PageInfo<NewsSearchResponse> selectForApiList(PageBean<NewsSearchRequest> request) throws ProException;

	/** 新闻详情 **/
	public NewsDetailResponse newsDetail(Long newsId, Long userId) throws ProException;

	/** 评论列表 **/
	public PageInfo<CommentSearchResponse> selectCommentForApiList(PageBean<CommentSearchRequest> request)
			throws ProException;

	/** 新闻操作 **/
	public void newsOperate(ResOperate operate) throws ProAffairException;

	/** 发布评论 **/
	public NewsComment addComment(NewsComment request) throws ProAffairException;

}
